package com.zhoukx.visitor;

/**
 * @ClassName Client
 * @Description:
 * @Author zhoukx
 * @Date 2020/8/17
 **/
public class Client {

    public static void main(String[] args) {
        // 创建ObjectStructre
        ObjectStructure objectStructure = new ObjectStructure();
        objectStructure.attach(new Man());
        objectStructure.attach(new Woman());
        objectStructure.attach(new Man());

        // 成功
        Success success = new Success();
        objectStructure.display(success);

        Fail fail = new Fail();
        objectStructure.display(fail);


        Wait wait = new Wait();
        objectStructure.display(wait);
    }

}
